import TileLayer from 'ol/layer/Tile';
import XYZ from 'ol/source/XYZ';
import { layerZoom } from "../mapConfig/layerConfig";


// 加载瓦片图层
export function loadTileLayer(url: string) {
    const layer = new TileLayer({
        source: new XYZ({
            url
        }),
        zIndex: layerZoom.layerTileZoom   // 默认瓦片图层为最底层
    })

    return layer
}


